{include file="kuyou/common/menu" /}
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="table_box">
        <table id="unit_table">
            <tr>
                <td class="text_right"><div class="">{:__('Basic Unit')}</div></td>
                <td>
                    <div>
                        <input data-rule="required" type="text" name="row[basic_unit]" class="basic_unit" value="{$row.name}">
                        <input type="hidden" name="row[basic_unit_id]" value="{$row.id}">
                    </div>
                </td>
                <td colspan="3" class="notice">{:__('Basic Unit')}应为最小度量单位</td>
            </tr>
            {foreach name="unit" item="info" key="k"}
            <tr>
                <td class="text_right">
                    <div class="">
                        <span class="add"><i class="fa fa-plus"></i></span><span class="del"><i class="fa fa-trash"></i></span>
                        <span class="unit_name">{:__('Deputy Unit')}{$k+1}</span>
                    </div>
                </td>
                <td>
                    <div>
                        <input data-rule="required" type="text" name="row[sub_unit][]" class="goods_note" value="{$info.name}">
                    </div>
                <td>=</td>
                <td>
                    <input data-rule="required" type="number" name="row[advance_rate][]" class="advance_rate" value="{$info.advance_rate}">
                </td>
                <td class="basic_unit_td">{$row.name}</td>
            </tr>
            {/foreach}
        </table>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
